
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%@page import="com.tss.util.*"%>
<%@page import="com.jedi.*"%>
<%@page import="com.store.*"%>
<%@page import="java.util.*"%>
<%@page import="java.text.*"%>
<%@include file="../global_var.jsp"%>
<%@include file="../check_login.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
List list = null;
%>
<html>
<head>
    <base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<link href="style/main.css" rel="stylesheet" type="text/css">
<script language="javascript" src="js/common.js"></script>
<script language="javascript">
function clk_artcle_show(article_id) {
	location.href = "know_article_modi.jsp?article_id=" + article_id;
}

function clk_search() {
	var sForm = document.searchForm;
	try {
		var oForm = document.pageForm;
		oForm.category_id.value = sForm.category_id.options[sForm.category_id.selectedIndex].value;
		oForm.keyval.value = sForm.keyval.value;
		oForm.submit();
	}
	catch(ex) {
		//alert(ex.description);
		sForm.submit();
	}
}
</script>
</head>
<body  leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td >
      <%
      ArticleCateMgr cateMgr = new ArticleCateMgr();
      ArticleMgr articleMgr = new ArticleMgr();
      list = cateMgr.get(" and is_leaf = 0","order_id");
      if (list != null && list.size() > 0) {
      	for(int i=0;i<list.size();i++) {
      		ArticleCategory item = (ArticleCategory)list.get(i);
      		articleMgr.setTopNum(5);
      		List articleList = articleMgr.get(" and b.parent_id='" + item.getId() + "'","issue_time desc");
      		if (articleList != null && articleList.size() > 0) {
      %>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="31" valign="top" background="images/title_bk_01.gif" style="padding-left:10px;padding-top:6px;">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="50%" style="color:#FFFFFF;font-size:13px;">
                  <b><%=item.getCategoryName()%></b>
                </td>
                <td width="50%" align="right" style="padding-right:10px;">&nbsp;
                  <span onclick="right_menu_clk('know_article_list.jsp?parent_id=<%=item.getId()%>');" style="cursor:hand;color:#FFFFFF;font-size:12px;text-de--ation: underline;">更多 >></span>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
          <td height="10" align="right" valign="top" style="padding-top:5px;padding-bottom:10px;padding-right:5px;"> 
            <%
            	for(int j=0;j<articleList.size();j++) {
            		Article subItem = (Article)articleList.get(j);
            		String bgColor[] = {"#FFFFFF","#EDEDF0"};
            %>
            <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
              <tr bgcolor="<%=bgColor[j%2]%>"> 
                <td height="20" width="50%" style="padding-left:5px;">
                  <a href="knowledge_mgt/know_article_show.jsp?article_id=<%=subItem.getId()%>"><%=subItem.getArticleTitle()%></a>
                </td>
                <td width="35%">发布时间：<%=subItem.getIssueTime()%></td>
                <td width="15%">点击数:<%=subItem.getHit()%></td>
              </tr>
            </table>
            <%
            	}
            %>
          </td>
        </tr>
      </table>
      <%
      		}
      	}
      }
      %>
      <%
      DownloadMgr downloadMgr = new DownloadMgr();
      downloadMgr.setTopNum(5);
      list = downloadMgr.get("","issue_time desc");
      %>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="31" valign="top" background="images/title_bk_01.gif" style="padding-left:10px;padding-top:6px;">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="50%" style="color:#FFFFFF;font-size:13px;">
                  <b>最新下载</b>
                </td>
                <td width="50%" align="right" style="padding-right:10px;">&nbsp;
                  <span onclick="right_menu_clk('know_soft_list.jsp');" style="cursor:hand;color:#FFFFFF;font-size:12px;text-de--ation: underline;">更多 >></span>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
          <td height="10" align="right" valign="top" style="padding-top:5px;padding-bottom:10px;padding-right:5px;"> 
            <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
              <%
              if (list != null && list.size() > 0) {
              for(int i=0;i<list.size();i++) {
              	String bgColor[] = {"#FFFFFF","#EDEDF0"};
              	Download item = (Download)list.get(i);
              %>
              <tr bgcolor="<%=bgColor[i%2]%>"> 
                <td height="20" width="45%" style="padding-left:5px;">
                  <a href="knowledge_mgt/know_soft_detail.jsp?id=<%=item.getId()%>"><%=item.getSoftName()%></a>
                </td>
                <td width="20%">类别：<%=item.getCate().getCategoryName()%></td>
                <td width="22%"><%=item.getIssueTime()%></td>
                <td width="13%"><%=item.getSoftLanguage()%></td>
              </tr>
              <%}}%>
            </table>
          </td>
        </tr>
      </table>
      <%
      MessageMgr msgMgr = new MessageMgr();
      msgMgr.setTopNum(5);
      list = msgMgr.get(" and msg_type = 0","issue_time desc");
      %>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="31" valign="top" background="images/title_bk_01.gif" style="padding-left:10px;padding-top:6px;">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="50%" style="color:#FFFFFF;font-size:13px;">
                  <b>最新咨询</b>
                </td>
                <td width="50%" align="right" style="padding-right:10px;">&nbsp;
                  <span onclick="right_menu_clk('knowledge_msg_list.jsp');" style="cursor:hand;color:#FFFFFF;font-size:12px;text-de--ation: underline;">我要咨询 >></span>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
          <td height="10" align="right" valign="top" style="padding-top:5px;padding-bottom:10px;padding-right:5px;"> 
            <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
              <%
              if (list != null && list.size() > 0) {
              for(int i=0;i<list.size();i++) {
              	String bgColor[] = {"#FFFFFF","#EDEDF0"};
              	Message item = (Message)list.get(i);
              %>
              <tr bgcolor="<%=bgColor[i%2]%>"> 
                <td height="20" width="45%" style="padding-left:5px;">
                  <%=item.getMsgTitle()%>
                </td>
                <td width="22%"><%=item.getIssueTime()%></td>
                <td width="18%"><%=item.getAuthorName()%></td>
                <td width="15%">回复数：<%=item.getReplyNum()%></td>
              </tr>
              <%}}%>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>